﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Epam.PhotoGallery.Interfaces.DataTransferObjects
{
    /// <summary>
    /// This class represent comment for the topic
    /// </summary>
    public class Comment
    {
       #region Fields

        private string _id;

        #endregion



        public Comment()
        {
            Images = new List<CommunityImage>();
            Text = string.Empty;
        }

        /// <summary>
        /// Gets or sets the comment's ID 
        /// </summary>
        /// <value>
        /// The comment's ID
        /// </value>
        public string ID
        {
            get
            {
                if (_id == null)
                {
                    _id = Guid.NewGuid().ToString();
                }

                return _id;
            }

            set
            {
                if (value != null)
                {
                    _id = value;
                }
            }
        }


        /// <summary>
        /// Gets or sets the comment's text 
        /// </summary>
        /// <value>
        /// The comment's text
        /// </value>
        public string Text
        { get; set; }

        /// <summary>
        /// Gets or sets the comment's images 
        /// </summary>
        /// <value>
        /// The comment's images
        /// </value>
        public List<CommunityImage> Images
        { get; set; }

    }
}
